<template>
  <el-main>
    <el-col class="search-form">
      <el-form :inline="true" :model="formInline" size="mini">
        <el-form-item label="付款总额:">
          <el-input class="ipt-width-150" v-model="formInline.user" placeholder="输入日期"></el-input>
        </el-form-item>
        <el-form-item label="支付日期:">
          <el-input class="ipt-width-150" v-model="formInline.user1" placeholder="输入申请人"></el-input>
        </el-form-item>
        <el-form-item label="创建人:">
          <el-input class="ipt-width-150" v-model="formInline.user2" placeholder="输入创建人"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">查询</el-button>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">重置</el-button>
        </el-form-item>
      </el-form>
    </el-col>

    <el-col class="biaoDa">
      <el-button type="primary" @click="dialogFormVisible = true" class="text-rigth">添加</el-button>
      <el-table :data="textData" class="table" border style="width: 100%">
        <el-table-column fixed prop="id" label="付款事由" width="150"></el-table-column>
        <el-table-column prop="name" label="付款总额" width="150"></el-table-column>
        <el-table-column prop="sex" label="付款方式" width="100"></el-table-column>
        <el-table-column prop="clas" label="支付日期" width="150"></el-table-column>
        <el-table-column prop="number" label="支付对象" width="120"></el-table-column>
        <el-table-column prop="idCard" label="开户行" width="200"></el-table-column>
        <el-table-column prop="add" label="银行账户" width="150"></el-table-column>
        <el-table-column prop="date" label="审批状态" width="150"></el-table-column>
        <el-table-column prop="date1" label="创建人" width="100"></el-table-column>
        <el-table-column prop="right" label="创建时间" width="150"></el-table-column>
        <el-table-column fixed="right" label="操作" width="125">
          <template slot-scope="scope" width="100">
           <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
            <el-button @click="handleClick(scope.row)" type="text" size="small">更改</el-button>
            <el-button @click="handleClick(scope.row)" type="text" size="small">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-col>

    <!-- 页表头 -->
    <el-col class="block">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage4"
        :page-sizes="[100, 200, 300, 400]"
        :page-size="100"
        layout="total, sizes, prev, pager, next, jumper"
        :total="400"
      ></el-pagination>
    </el-col>
    <!-- 模态框添加 -->
    <el-dialog title="添加付款申请" :visible.sync="dialogFormVisible" >
      <el-form :model="form" class="me-text">
        <el-form-item label="付款事由" class="me-nai1">
          <el-input v-model="form.addName" class="me-input"></el-input>
        </el-form-item>
        <el-form-item label="付款总额" class="me-nai1">
          <el-input v-model="form.addSex" class="me-input"></el-input>
        </el-form-item>
        <el-form-item label="付款方式" class="me-nai1">
          <el-input v-model="form.addClass" class="me-input"></el-input>
        </el-form-item>
        <el-form-item label="支付日期" class="me-nai1">
          <el-input v-model="form.addNumber" class="me-input"></el-input>
        </el-form-item>
        <el-form-item label="支付对象" class="me-nai1">
          <el-input v-model="form.addIdcard" class="me-input"></el-input>
        </el-form-item>
        <el-form-item label="开户行" class="me-nai1">
          <el-input v-model="form.addAdd" class="me-input"></el-input>
        </el-form-item>
        <el-form-item label="银行账户" class="me-nai1">
          <el-input v-model="form.addDate" class="me-input"></el-input>
        </el-form-item>
        <el-form-item label="审批人" class="me-nai1">
          <el-input v-model="form.addren" class="me-input"></el-input>
        </el-form-item>
        <el-form-item label="抄送人" class="me-nai1">
          <el-input v-model="form.so" class="me-input"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
      </div>
    </el-dialog>

  </el-main>
</template>

<script>
export default {
  name: "payment",
  data() {
    return {
      textData: [
        {id:"吃饭",name:"1000",sex:"现金",clas:"2020-9-1",number:"饭店",idCard:"银行",add:"工商银行",date:"审批中",date1:"我",right:"2020-9-7"},
      ],
      onSubmit: {},
      dialogTableVisible: false,
      dialogFormVisible: false,
       // <!-- 添加信息模态框 -->
      form: {
        addName: "",
        addSex: "",
        addClass: "",
        addNumber: "",
        addIdcard: "",
        addAdd: "",
        addDate: "",
        addren: "",
        so: "",
      },
      formLabelWidth: "120px",
      dialogImageUrl: "",
      dialogVisible: false,
      disabled: false,
      formInline: {
        user: "",
        region: "",
      },
       // 翻页
      currentPage4: 1,
    };
  },
  methods:{
    // 翻页
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  }
};
</script>

<style scoped lang="less">
.search-form {
  height: 60px;
  padding-top: 15px;
  margin-bottom: 20px;
  padding-left: 20px;
  box-shadow: 0 0 3px 1px #e4e4e4;
  font-size: 25px;
}
.text-rigth {
  margin-top: 10px;
 margin-bottom: 15px;
}
.biaoDa {
  margin-bottom: 10px;
  padding-left: 20px;
  padding-bottom: 20px;
  padding-right: 20px;
  box-shadow: 0 0px 3px 1px #e4e4e4;
}
.block {
  height: 50px;
  text-align: center;
  padding-top: 15px;
  box-shadow: 0 0px 3px 1px #e4e4e4;
}
.me-text {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
.me-nai1 {
  width: 50%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  margin-bottom: 5px;
}
.me-input {
  widows: 100px;
}
</style>